package com.tianji.promotion.controller;

import com.tianji.common.domain.dto.PageDTO;
import com.tianji.promotion.domain.po.ExchangeCode;
import com.tianji.promotion.domain.query.CodeQuery;
import com.tianji.promotion.service.IExchangeCodeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 兑换码 控制器
 * </p>
 *
 * @author xjs
 */
@Api(tags = "ExchangeCode管理")
@RestController
@RequiredArgsConstructor
@RequestMapping("/codes")
public class ExchangeCodeController {


    private final IExchangeCodeService codeService;

    @ApiOperation("查看兑换码")
    @GetMapping("/page")
    public PageDTO<ExchangeCode> pageQuery(CodeQuery query){
        return codeService.pageQuery(query);
    }


}
